﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using SPDeveloper.Web.Models;

namespace SPDeveloper.Web.Controllers
{
    public class HomeController : Controller
    {
        SPDevWebDBContext dbContext = new SPDevWebDBContext();
        public ActionResult Index()
        {
            var newArticle = dbContext.Articles.ToList();


            return View(newArticle);
        }

        public ActionResult About()
        {
            return View();
        }

        public ActionResult Product(string title,int count)
        {
            ViewBag.ProductCount = count;
            ViewBag.ProductName = "You will buy "+ title;


            return View(); 
        }
    }
}
